<script setup>
import axios from 'axios'
import { ref } from 'vue'
import router from '../router/router'
import { useStore } from 'vuex'
import { ElMessage } from 'element-plus'
const store = useStore()
const result = ref('')

const uid = ref(store.state.userStore.userInfo.data.id)
const goBack = () => {
  router.push('/articleList')
}
const newpassword = ref('')

const newword = () => {
  console.log(newpassword.value)
  axios.get('api/mycontroller8/mymethod8/' + uid.value + '/' + newpassword.value).then((res) => {
    result.value = res.data
    console.log(result.value)
    ElMessage.success('修改成功')
  })
}
</script>

<template>
<div style="text-align: left;">
        <el-button type="text"  @click="goBack" style="padding-bottom: 0px;"><el-icon><Back /></el-icon>返回</el-button>
    </div>
 <el-input v-model="newpassword" placeholder="请输入新密码" />
 <button @click="newword">提交</button>
</template>

<style scoped>

</style>
